'use strict';

/**
 * @description 角色表模型
 * */
module.exports = app => {
  const { STRING, TEXT } = app.Sequelize;

  const Role = app.model.define('role', {
    name: {
      type: STRING(20),
      allowNull: false,
      comment: '角色名',
    },
    auth: {
      type: STRING,
      allowNull: false,
      comment: '角色权限',
    },
    description: {
      type: TEXT,
      allowNull: false,
      comment: '角色描述',
    },
  });

  return Role;
};
